//
//  JJBaseViewController.h
//  DemoPro
//
//  Created by vpjacob on 2017/4/7.
//  Copyright © 2017年 vpjacob. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MJRefresh.h>

typedef void(^JJMJFooterLoadCompleteBlock)(NSInteger page);
typedef void(^JJMJHeaderLoadCompleteBlock)(NSInteger page);

@interface JJBaseViewController : UIViewController<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate>

@property (nonatomic, strong) UITableView *jjTableView;
@property (nonatomic, strong) UITableView *jjGroupTableView;
@property (nonatomic, strong) NSMutableArray *dataArray;
@property (nonatomic, assign) NSInteger requestPage; //加载页数
@property (nonatomic, strong) UIView *navBgView;//nav背景色


/**
 *  添加导航按钮
 *  @param imgName 图片
 *  @param sel     sel
 */
- (void)addRightBarItemImageName:(NSString *)imgName sel:(SEL)sel;

/**
 *  添加导航按钮
 *  @param title 标题
 *  @param sel   sel
 */
- (void)addRightBarItemTitle:(NSString *)title sel:(SEL)sel;
/**
 *  添加下拉加载更多
 */
- (void)addMJRefreshHeadView:(JJMJHeaderLoadCompleteBlock)completeBlock;

/**
 *  添加上拉加载更多
 */
- (void)addMJRefreshFootView:(JJMJFooterLoadCompleteBlock)completeBlock;

- (void)requestSuccess:(BOOL)success requestEnd:(BOOL)end;


#pragma mark - UIBarButtonItemAction
- (void)leftBarButtonItemAction:(UIBarButtonItem *)item;

@end
